package com.hbpu.encap.homework;

public class Homework06 {
    public static void main(String[] args) {
        LabeledPoint blackThursday = new LabeledPoint(230, 07, "Black Thursday", 1929);
        System.out.println(blackThursday.printLable());
    }
}

class Point {
    private int pointX;
    private int pointY;

    public Point(int pointX, int pointY) {
        this.pointX = pointX;
        this.pointY = pointY;
    }

    public int getPointX() {
        return pointX;
    }

    public void setPointX(int pointX) {
        this.pointX = pointX;
    }

    public int getPointY() {
        return pointY;
    }

    public void setPointY(int pointY) {
        this.pointY = pointY;
    }
}

class LabeledPoint extends Point {
    private String label;
    private int year;

    public LabeledPoint(int pointX, int pointY, String date, int year) {
        super(pointX, pointY);
        this.label = date;
        this.year = year;
    }

    public String printLable() {
        return label + "： 日期：" + year  + " 坐标：" + super.getPointX() + "." + super.getPointY();
    }
}
